package com.htu.service.impl;

import com.htu.dao.IGoodsDao;
import com.htu.domain.Goods;
import com.htu.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements IGoodsService
{
    @Autowired
    private IGoodsDao dao;

    @Override
    public boolean doGoodsInsert(Goods goods)
    {
        return dao.insertGoods(goods);
    }

    @Override
    public List<Goods> doGoodsMegs()
    {
        return dao.queryGoodsAll();
    }

    @Override
    public List<Goods> doGoodsMan(int type)
    {
        return dao.queryGoodsMan(type);
    }

    @Override
    public List<Goods> doGoodsWoman(int type)
    {
        return dao.queryGoodsWoman(type);
    }

    @Override
    public boolean doGoodsDelete(int id)
    {
        return dao.deleteGoods(id);
    }

    @Override
    public boolean doGoodInsert(Goods goods)
    {
        return dao.insertGood(goods);
    }
}
